﻿<UserControl x:Class="ForumsBrowser.SelectedForumsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fb="clr-namespace:ForumsBrowser"
    Width="200" VerticalAlignment="Stretch" Margin="3,0,3,0" >
    <UserControl.Resources>
        <fb:ForumList x:Key="forums"/>
    </UserControl.Resources>
    <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Black">
        <Label Name="Lala" Style="{StaticResource SelectedForumsTitle}" MouseLeftButtonDown="Label_MouseLeftButtonDown">
            <TextBlock HorizontalAlignment="Center" Text="Selected Forums" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType= {x:Type Label}}}" />
        </Label>
        <ListView Background="Black" 
                  ItemsSource="{Binding Source={StaticResource forums} }" 
                  Padding="0,0,0,0" Margin="0,0,0,0" HorizontalContentAlignment="Stretch" 
                  BorderThickness="0" BorderBrush="Black" 
                  x:Name="listView1" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                  HorizontalAlignment="Stretch" >
            <ListView.ItemTemplate>
                <DataTemplate>
                    <ToggleButton Checked="CheckBox_CheckedChanged" Unchecked="CheckBox_CheckedChanged" Tag="{Binding Path=ShortName}" HorizontalContentAlignment="Stretch">
                        <TextBlock Text="{Binding Path=LongName}" HorizontalAlignment="Center" TextTrimming="CharacterEllipsis" />
                    </ToggleButton>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>                    
    </StackPanel>
</UserControl>
